function attachTableEvent(){
	$('td[name=elmTable] [tableid]').click(function(){
		loadDynamicJSP($("div[for=pageload]"),"/POS/OrderItem.jsp",waitingDialog,function(resp,obj){
			closeWaitingDialog();
			SelectTab(obj.dom.attr("tableid"));
		},{dom:$(this)});
	});
}

/****/
function getCurrentTable(){
	var tableId = $("#tabs .tab.active").attr("table");
	if(tableId == "All") return null;
	else
		return getTableData(tableId);
}

/****/
function getTableData(tableId){
	for(var _i=0;_i<POS.length;_i++)
		if(POS[_i].table.id == tableId){
			if(POS[_i].table.id == tableId) return POS[_i];
		}
	return null;
}